package procilege.impl.formatter;

import procilege.compute.ExprFormatTraveller;
import procilege.compute.PlaceTypeMetadata;
import procilege.compute.PlaceType;
import procilege.lang.PredicatePrivAvailiability;
import procilege.lang.PrivExprElement;

@PlaceTypeMetadata(type = PredicatePrivAvailiability.class)
public class PredicatePrivAvailiabilityFormatter implements
		PlaceType<ExprFormatTraveller> {

	public void visit(ExprFormatTraveller tr, Object place) {

		StringBuilder sb = tr.getBuilder();
		PredicatePrivAvailiability n = (PredicatePrivAvailiability) place;

		sb.append("privavail(");
		PrivExprElement expr = n.getPrivExpr();
		if (expr != null)
			tr.setout(expr);
		sb.append(")");
	}
}